import Vue from 'vue'
import Router from 'vue-router'
import Login from "../views/Login.vue";
import Main from "../views/Main.vue";
import Hello from "../views/Hello.vue";
import Brands from "../views/setting/Brands.vue";
import Resources from "../views/role/Resources.vue";
import Customers from "../views/customer/Customers.vue";
import Order from "../views/order/OrderList.vue";
import OrderPay from "../views/order/OrderPay.vue";
import OrderBack from "../views/order/OrderBack.vue";
import OrderSendList from "../views/order/OrderSendList.vue";
import OrderInvoice from "../views/order/OrderInvoice.vue";
import Receivers from "../views/customer/Receivers.vue";
import Coupons from "../views/customer/Coupons.vue";
import Invoices from "../views/customer/Invoices.vue";
import Favorites from "../views/customer/Favorites.vue";
import Category from "../views/setting/Category.vue";
import Areas from "../views/setting/Areas.vue";
import Activities from "../views/activity/Activities.vue";
import DiscountActivity from "../views/activity/DiscountActivity.vue";
import CrowActivity from "../views/activity/CrowActivity.vue";
import CouponActivity from "../views/activity/CouponActivity.vue";
import GoodsInfo from "../views/goods/GoodsInfo.vue";
import GoodsPublish from "../views/goods/GoodsPublish.vue";
import DealerPricing from "../views/goods/DealerPricing.vue";
import SecKillActivity from "../views/activity/SecKillActivity.vue";
import DashBoard from "../views/DashBoard.vue";

Vue.use(Router);

export default new Router({
  routes: [
    {path: '/login', name: 'login', component: Login,},
    {
      path: '/', component: Main, children: [
      {path: '/demo', name: 'demo', component: Hello},
      {path: '/', name: 'dashBoard', component: DashBoard},
      {path: 'resources', name: 'resources', component: Resources},
      {path: 'setting/brands', name: 'brands', component: Brands},
      {path: 'setting/category', name: 'category', component: Category},
      {path: 'setting/areas', name: 'areas', component: Areas},
      {path: 'customers', name: 'customers', component: Customers},
      {path: 'customers/receivers', name: 'receivers', component: Receivers},
      {path: 'customers/coupons', name: 'coupons', component: Coupons},
      {path: 'customers/invoices', name: 'invoices', component: Invoices},
      {path: 'customers/favorites', name: 'favorites', component: Favorites},
      /*订单管理 订单列表*/
      {path: 'order/orderlist', name: 'orderlist', component: Order},
      /*支付订单*/
      {path: 'order/pay', name: 'orderpay', component: OrderPay},
      /*申退审核*/
      {path: 'order/orderback', name: 'orderback', component: OrderBack},
      /*订单下发*/
      {path: 'order/senddown', name: 'ordersendlist', component: OrderSendList},
      /*合同发票导出*/
      {path:'order/invoice',name:'orderinvoice',component:OrderInvoice},
      /*商品列表管理*/
      {path: 'goods/goodsInfo', name: 'goodsInfo', component: GoodsInfo},
      /*商品发布*/
      {path: 'goods/publish', name: 'goodsPublish', component: GoodsPublish},
      /*活动管理*/
      {path: 'activities', name: 'activities', component: Activities},
      {path: 'activities/discount', name: 'discountActivities', component: DiscountActivity},
      /*秒杀活动*/
      {path: 'activities/secKillActivity', name: 'secKillActivity', component: SecKillActivity},
      /*众筹活动*/
      {path: 'activities/crowActivity', name: 'crowActivity', component: CrowActivity},
      /*代金券活动*/
      {path: 'activities/couponActivity', name: 'couponActivity', component: CouponActivity},
      {path: 'dealer/pricing', name: 'DealerPricing', component: DealerPricing},
    ]
    }
  ]
})
